<?php
/**
 * QQAS - share your knowledge to the world!
 *
 * @author		xiaochong0302 <xiaochong0302@gmail.com>
 * @copyright	Copyright (c) 2011, Koogua Studio.
 * @license		http://www.qqas.org/user_guide/license.html
 * @link		http://www.qqas.org
 * @since		Version 1.0
 * @filesource
 */


class UserGroupModel extends Model
{

	//缓存用户组
	public function cacheUserGroup($groupID=0)
	{
    	if ($groupID) {
    		$where  = array('group_id' => $groupID);
    		$result = $this->where($where)->find();
    		if ($result)
    		{
    			F('cache_usergroup_'.$groupID, $result);
    		}
    	} else {
    		$results = $this->select();
    		if ($results)
    		{
    			foreach ($results as $value)
    			{
    				F('cache_usergroup_'.$value['group_id'], $value);
    			}
    		}
    	}
	}

}

/* End of file UserGroupModel.class.php */
/* Location: ./App/Lib/Model/UserGroupModel.class.php */